<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>ViewerInfo</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>ViewerInfo</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a  href="index.html">structures</a><br>
</div>

<div class=shortdescr>
The <dfn>ViewerInfo</dfn> structure is used to get information about the current state of the internal viewer.
</div>

<pre class=syntax>
struct ViewerInfo
{
  int  StructSize;
  int  ViewerID;
  const char *FileName;
  FARINT64 FileSize;
  FARINT64 FilePos;
  int  WindowSizeX;
  int  WindowSizeY;
  DWORD Options;
  int  TabSize;
  struct ViewerMode CurMode;
  int  LeftPos;
  DWORD Reserved3;
};
</pre>

<h3>Elements</h3>
<div class=descr>
  <div class=dfn>StructSize</div>
  <div class=dfndescr>Size of the ViewerInfo structure. You must set this field.
  </div>

  <div class=dfn>ViewerID</div>
  <div class=dfndescr>Identifier of the viewer instance. Each viewer instance has a unique
  identifier that cannot be repeated during a FAR session.
  </div>

  <div class=dfn>FileName</div>
  <div class=dfndescr>Full path and name of the file beeing viewed.
  </div>

  <div class=dfn>FileSize</div>
  <div class=dfndescr>File size. Veriable of <a href="farint64.html">FARINT64</a> type.</div>

  <div class=dfn>FilePos</div>
  <div class=dfndescr>Current file position (absolute offset in bytes).
  Variable of <a href="farint64.html">FARINT64</a> type.</div>

  <div class=dfn>WindowSizeX, WindowSizeY</div>
  <div class=dfndescr>Width and height of the viewer window.</div>

  <div class=dfn>Options</div>
  <div class=dfndescr>Describes viewer options state.
  Can be a combination of the following flags (<a name="VIEWER_OPTIONS">VIEWER_OPTIONS</a> enum):
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Flag</th><th class="cont" width="60%">Description</th></tr>
    <tr class="cont"><td class="cont" width="40%"><a name="VOPT_SAVEFILEPOSITION">VOPT_SAVEFILEPOSITION</a></td>
    <td class="cont" width="60%">"Save file position"</td></tr>
    <tr class="cont"><td class="cont" width="40%"><a name="VOPT_AUTODETECTTABLE">VOPT_AUTODETECTTABLE</a></td>
    <td class="cont" width="60%">"Autodetect character table"</td></tr>
</table>
  </div>

  <div class=dfn>TabSize</div>
  <div class=dfndescr>Tabulation size.</div>

  <div class=dfn>CurMode</div>
  <div class=dfndescr>A variable of <a href="viewermode.html">ViewerMode</a> type - additional
   information about the view mode.</div>

  <div class=dfn>LeftPos</div>
  <div class=dfndescr>Position of the left border of the viewer window in the viewed text.</div>

  <div class=dfn>Reserved3</div>
  <div class=dfndescr>Reserved for future use.</div>

</div>

<div class=see>See also:</div><div class=seecont>
<a href="index.html">Structures</a>,
<a href="../service_functions/viewercontrol.html">ViewerControl</a>,
<a href="viewermode.html">ViewerMode</a>
</div>

</body>
</html>
